package cn.ddiancan.xddcloud.psc.flow.feign;

import cn.ddiancan.xddcloud.psc.flow.entity.XddExtInstance;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 扩展流程实例数据访问层接口
 */
@FeignClient(contextId = "XddExtInstanceService", name = "xddcloud-flow-server")
public interface XddExtInstanceRemoteService {

    @PostMapping("/flow/extInstance/insert")
    boolean insert(@RequestBody XddExtInstance extInstance);

    @DeleteMapping("/flow/extInstance/deleteById/{processId}")
    boolean deleteByProcessId(@PathVariable("processId") Long processId);

    @PutMapping("/flow/extInstance/updateById")
    boolean updateById(@RequestBody XddExtInstance extInstance);

    @GetMapping("/flow/extInstance/selectById/{id}")
    XddExtInstance selectById(@PathVariable("id") Long id);

}
